package com.zlx.springclouddemo.school.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class SchoolController {

    @Value("${school.id}")
    private String schoolId;

    @GetMapping(value = "/schoolid",produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public String getSchoolName(){
        return schoolId;
    }
}
